package com.scfinance.SPD.encrypt.util;

import com.scfinance.SPD.encrypt.util.ConstantUtil;

public class Constant {

	public static final int RSA = 0; // 软加密
	public static final int UAT = 1; // UAT加密
	public static final int PAT = 2; // 生产加密
	public static final int ZH = 3; // 总行生产加密
	public static String ERRORCODE = "", ERRORMSG = ""; // 解密错误信息
	public static int FINISH_ACTIVITY = 0x100;// 销毁activity
	public static int LOAD_ACTIVITY = 0x101;// 销毁activity

	public static String TYPE_DRAFT = "0"; // 0草稿箱
	public static String TYPE_SENDBOX = "1"; // 1待发件
	public static String TYPE_PROBLEM = "2"; // 2问题件
	//uat
//	public static final String BASE_URL_UAT = "http://172.30.122.102:7001/SPDBankServer/";
//	public static final String BASE_URL_UAT = "http://172.30.112.100:8080/SPDBankServer/";
//	public static final String BASE_URL_PAT = "http://172.20.112.62:7001/SPDBankServer/";
	//准生产
	public static final String BASE_URL_PAT = "http://172.29.48.61:7001/SPDBankServer/";
	public static final String BASE_URL_UAT = "http://172.29.48.61:7001/SPDBankServer/";
	//新核心演练
//	public static final String BASE_URL_UAT = "http://172.30.152.23:7001/SPDBankServer/";

	public static final String BASE_URL_ZH = "https://eapplication.spdbccc.com.cn:17001/SPDBankServer/";
	public static final String BASE_DATASERVICE_URL_UAT = BASE_URL_UAT
			+ "MainServlet";// APN远程UAT硬加密服务器访问地址(uat硬加密)
	public static final String BASE_DATASERVICE_URL_PAT = BASE_URL_PAT
			+ "MainServlet";// APN远程产品服务器访问地址/生产环境
	public static final String BASE_DATASERVICE_URL_ZH = BASE_URL_ZH
			+ "MainServlet";// 总行服务器访问地址
	public static final String BASE_FILE_UPANDLOAD = "UploadServletZG";// 上传和下载借口
	public static final String BASE_FILE_UPANDLOAD_AGAIN = "UploadServletForChongDao";// 上传(重导)
	public static final String BASE_BATCH_DOWNLOAD = "downServletForTuanban";// 批量团办下载
	public static final String BASE_LOGFILE_UPANDLOAD = "UploadServletForPadLogs";// 日志上传和下载接口
	public static final String ACTIVATI_UPLOAD = "UploadServletForJiHuoPic";// 激活上传文件
	public static final String BASE_NOCARD_UPLOAD = "UploadServletForLingYongHeYue";//无卡分期拒绝，上传领用合约
	/**
	 * 读取名片
	 */
	public static final String READCARD = "BusunessCardUploadServlet";
	public static final String APK_NAME = "pfwx_common_lx.apk";
	public static final String READCARD_APK_NAME = "spdcccReadCard.apk";
	public static final String WPS_APK_NAME = "mofficeSpdbccc.apk";

	public static final String SUCCESS_CODE = "0000";
	/**
	 * 聚信力uat测试
	 */
	public static final String JXL_UAT_URL = "http://172.30.122.102:8001/#/init/";
	/**
	 * 聚信力pat测试
	 */
	public static final String JXL_PAT_URL = "http://172.20.112.106:8001/#/init/";
	
	
	/**
	 * @return
	 */
	public static String getThress() {
		return "dianll";
	}

	/**
	 * 获取联网MainServlet地址
	 * 
	 * @param key
	 * @return
	 */
	public static String getUrl(int key) {
		String url = "";
		switch (key) {
		case RSA:
			url = "";
			break;
		case UAT:
			url = BASE_DATASERVICE_URL_UAT;
			break;
		case PAT:
			url = BASE_DATASERVICE_URL_PAT;
			break;
		case ZH:
			url = BASE_DATASERVICE_URL_ZH;
			break;
		}
		return url;
	}

	/**
	 * 获取联网地址
	 * 
	 * @param key
	 * @return
	 */
	public static String getNetUrl(int key) {
		String url = "";
		switch (key) {
		case RSA:
			url = "";
			break;
		case UAT:
			url = BASE_URL_UAT;
			break;
		case PAT:
			url = BASE_URL_PAT;
			break;
		case ZH:
			url = BASE_URL_ZH;
			break;
		}
		return url;
	}

	/**
	 * @Title: getJXLURL
	 * @Description: 获得聚信力url
	 * @param @return
	 * @return String
	 * @throws
	 */
	public static String getJXLURL() {
		String url = "";
		switch (ConstantUtil.ENCRYPTSTATUS) {
		case UAT:
			url = JXL_UAT_URL;
			break;
		case PAT:
			url = JXL_PAT_URL;
			break;
		}
		return url;
	}
	
	/**
	 * @Title: getCode 
	 * @Description: 获得环境code
	 * @param @return 
	 * @return String
	 * @throws
	 */
	public static String getCode() {
		String code = "";
		switch (ConstantUtil.ENCRYPTSTATUS) {
		case UAT:
			code = "uat";
			break;
		case PAT:
			code = "pat";
			break;
		case ZH:
			code = "zh";
			break;
		}
		return code;
	}
	
}
